package com.example.lotterysystem.common.enums;

import lombok.Getter;

@Getter
public enum GlobalErrorCodeEnum {
    SUCCESS(200, "成功"), UNKNOWN(999, "未知错误"),
    SYSTEM_ERROR(500, "系统错误"), REGISTER_ERROR(100, "注册失败"),
    LOGIN_ERROR(101, "登录失败"), PICTURE_ERROR(102, "图片上传失败"),
    PRIZE_LIST_ERROR(103, "查询奖品列表失败"), PRIZE_CREATE_ERROR(104, "奖品创建失败"),
    ACTIVITY_CREATE_ERROR(105, "创建活动失败") ,ACTIVITY_LIST_ERROR(106, "查询活动列表失败"),
    ACTIVITY_DETAIL_ERROR(106, "查询活动详细信息失败"),
    LOTTERY_PRIZE_ERROR(107, "抽奖结果错误"),
    ACTIVITY_STATUS_TRANSFER_ERROR(108, "活动状态转换失败"),
    CACHED_ERROR(109, "缓存失败"),
    PRIZE_DELETE_ERROR(110, "奖品删除失败"),
    USER_HISTORY_INFO(111, "查询用户历史中奖信息失败");

    GlobalErrorCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private Integer code;
    private String msg;


    public void setCode(Integer code) {
        this.code = code;
    }
    public void setMsg(String msg) {
        this.msg = msg;
    }
}
